import React from "react";
import { DocsThemeConfig, useConfig } from "nextra-theme-docs";
import { useRouter } from "next/router";

const config: DocsThemeConfig = {
  logo: (
    <>
      <svg
        viewBox="0 0 1024 1024"
        p-id="4231"
        width="24" height="24"
      >
        <path
          d="M925.144 387.882L227.622 574.757c-19.879 5.34-39.88-1.141-52.113-14.855l-97.212-56.118c-17.427-10.05-23.374-32.307-13.325-49.735s32.33-23.374 49.734-13.325l103.717 59.904 225.25-89.396-271.465-156.728c-24.661-14.248-33.812-44.613-20.389-67.842 13.398-23.204 44.273-30.486 68.934-16.238l426.785 159.884L793.66 272.32c78.546-21.044 161.777 29.419 168.719 55.293 6.942 25.923-9.758 52.915-37.234 60.27zM148.25 742.553h631.087c20.098 0 36.41 16.311 36.41 36.41s-16.312 36.408-36.41 36.408H148.251c-20.122 0-36.409-16.311-36.409-36.409s16.311-36.409 36.409-36.409z"
          p-id="4232"
        ></path>
      </svg>
      <span style={{ marginLeft: ".4em", fontWeight: 800 }}>hissss文档系统</span>
    </>
  ),
  useNextSeoProps: () => {
    const { asPath } = useRouter();
    if (asPath !== "/") {
      return {
        titleTemplate: "%s – hissss文档系统 专业",
      };
    }
  },
  head: () => {
    const { asPath, defaultLocale, locale } = useRouter();
    const { frontMatter } = useConfig();
    const url =
      "https://hissss.vip" +
      (defaultLocale === locale ? asPath : `/${locale}${asPath}`);

    return (
      <>
        <meta property="og:url" content={url} />
        <meta property="og:title" content={frontMatter.title || "hissss文档系统"} />
        <meta
          property="description"
          content={
            frontMatter.description ||
            "分享 Java React 前后端技术 全栈开发 领域设计 原型设计"
          }
        />
      </>
    );
  },
  docsRepositoryBase: "https://hissss.vip",
  footer: {
    text: (
      <span>
       Copyright &copy; 2019-{new Date().getFullYear()} {" hissss.vip "}
        <a href="https://beian.miit.gov.cn/" target="_blank">
          粤ICP备14064xxxxxxx号
        </a>
      </span>
    ),
  },
};

export default config;
